//
//  CellOfhuancun.m
//  project-A (pianke)
//
//  Created by dllo on 16/3/4.
//  Copyright © 2016年 scott. All rights reserved.
//

#import "CellOfhuancun.h"

@implementation CellOfhuancun

-(void)dealloc{
    [_viewline release];
    [_gongneng release];
    [_xianshi release];
    [super dealloc];
    
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self cretview];
    }
    return self;
}

-(void)cretview{
    
    self.viewline = [[UIView alloc]init];
    
    self.viewline.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:self.viewline];
    
    
    [self.viewline release];
    
    self.gongneng = [[UILabel alloc]init];
    [self.contentView addSubview:self.gongneng];
    self.gongneng.textAlignment = 0;
    
    self.gongneng.font = [UIFont fontWithName:@"ArialMT" size:19];
    [self.gongneng release];
    
    self.xianshi= [[UILabel alloc]init];
    [self.contentView addSubview:self.xianshi];
    
    self.xianshi.font = [UIFont fontWithName:@"ArialMT" size:19];
    
    self.xianshi.textAlignment = 1;
    
    [self.xianshi release];
}

-(void)layoutSubviews{
    
    CGFloat width = self.contentView.frame.size.width;
    self.gongneng.frame = CGRectMake(10, 15, width * 0.4, 50);
    self.xianshi.frame = CGRectMake(0.7*width, 15, 0.3 * width, 50);
    
    self.viewline.frame = CGRectMake(20, 79, width - 40, 1);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
